package com.yonyou.iuap.ipaas.connector.sdwcoatencent.internal.exception;

import com.yonyou.yonlinker.ysb.runtime.extension.api.error.ErrorTypeDefinition;
import com.yonyou.yonlinker.ysb.runtime.extension.api.exception.ModuleException;

public class ServiceException extends ModuleException {
  private String code;
  
  public <T extends Enum<T>> ServiceException(String code, String message, ErrorTypeDefinition<T> errorTypeDefinition, Throwable cause) {
    super(message, errorTypeDefinition, cause);
    this.code = code;
  }
  
  public <T extends Enum<T>> ServiceException(String code, String message, ErrorTypeDefinition<T> errorTypeDefinition) {
    super(message, errorTypeDefinition);
    this.code = code;
  }
  
  public <T extends Enum<T>> ServiceException(String message, ErrorTypeDefinition<T> errorTypeDefinition, Throwable cause) {
    super(message, errorTypeDefinition, cause);
    this.code = "999";
  }
  
  public <T extends Enum<T>> ServiceException(String message, ErrorTypeDefinition<T> errorTypeDefinition) {
    super(message, errorTypeDefinition);
    this.code = "999";
  }
}
